package com.hand.demo.infra.repository.impl;

import org.apache.commons.collections.CollectionUtils;
import org.hzero.mybatis.base.impl.BaseRepositoryImpl;
import org.springframework.stereotype.Component;
import com.hand.demo.domain.entity.HhrTaJobExp;
import com.hand.demo.domain.repository.HhrTaJobExpRepository;
import com.hand.demo.infra.mapper.HhrTaJobExpMapper;

import javax.annotation.Resource;
import java.util.List;

/**
 * 工作经历及实习经历表(HhrTaJobExp)资源库
 *
 * @author
 * @since 2025-06-16 12:16:53
 */
@Component
public class HhrTaJobExpRepositoryImpl extends BaseRepositoryImpl<HhrTaJobExp> implements HhrTaJobExpRepository {
    @Resource
    private HhrTaJobExpMapper hhrTaJobExpMapper;

    @Override
    public List<HhrTaJobExp> selectList(HhrTaJobExp hhrTaJobExp) {
        return hhrTaJobExpMapper.selectList(hhrTaJobExp);
    }

    @Override
    public HhrTaJobExp selectByPrimary(Long id) {
        HhrTaJobExp hhrTaJobExp = new HhrTaJobExp();
        hhrTaJobExp.setId(id);
        List<HhrTaJobExp> hhrTaJobExps = hhrTaJobExpMapper.selectList(hhrTaJobExp);
        if (hhrTaJobExps.size() == 0) {
            return null;
        }
        return hhrTaJobExps.get(0);
    }

}

